@discover @interactions
Feature: Discover Interactions
  Tests for user interactions within the discover module

  Background:
    Given the application is running

  # ============================================
  # Assistant Page Interactions
  # ============================================

  @DISCOVER-INTERACT-001 @P1
  Scenario: Search for assistants
    Given I navigate to "/discover/assistant"
    When I type "developer" in the search bar
    And I wait for the search results to load
    Then I should see filtered assistant cards

  @DISCOVER-INTERACT-002 @P1
  Scenario: Filter assistants by category
    Given I navigate to "/discover/assistant"
    When I click on a category in the category menu
    And I wait for the filtered results to load
    Then I should see assistant cards filtered by the selected category
    And the URL should contain the category parameter

  @DISCOVER-INTERACT-003 @P1
  Scenario: Navigate to next page of assistants
    Given I navigate to "/discover/assistant"
    When I click the next page button
    And I wait for the next page to load
    Then I should see different assistant cards
    And the URL should contain the page parameter

  @DISCOVER-INTERACT-004 @P1
  Scenario: Navigate to assistant detail page
    Given I navigate to "/discover/assistant"
    When I click on the first assistant card
    Then I should be navigated to the assistant detail page
    And I should see the assistant detail content

  # ============================================
  # Model Page Interactions
  # ============================================

  @DISCOVER-INTERACT-005 @P1
  Scenario: Sort models
    Given I navigate to "/discover/model"
    When I click on the sort dropdown
    And I select a sort option
    And I wait for the sorted results to load
    Then I should see model cards in the sorted order

  @DISCOVER-INTERACT-006 @P1
  Scenario: Navigate to model detail page
    Given I navigate to "/discover/model"
    When I click on the first model card
    Then I should be navigated to the model detail page
    And I should see the model detail content

  # ============================================
  # Provider Page Interactions
  # ============================================

  @DISCOVER-INTERACT-007 @P1
  Scenario: Navigate to provider detail page
    Given I navigate to "/discover/provider"
    When I click on the first provider card
    Then I should be navigated to the provider detail page
    And I should see the provider detail content

  # ============================================
  # MCP Page Interactions
  # ============================================

  @DISCOVER-INTERACT-008 @P1
  Scenario: Filter MCP tools by category
    Given I navigate to "/discover/mcp"
    When I click on a category in the category filter
    And I wait for the filtered results to load
    Then I should see MCP cards filtered by the selected category

  @DISCOVER-INTERACT-009 @P1
  Scenario: Navigate to MCP detail page
    Given I navigate to "/discover/mcp"
    When I click on the first MCP card
    Then I should be navigated to the MCP detail page
    And I should see the MCP detail content

  # ============================================
  # Home Page Interactions
  # ============================================

  @DISCOVER-INTERACT-010 @P1
  Scenario: Navigate from home to assistant list
    Given I navigate to "/discover"
    When I click on the "more" link in the featured assistants section
    Then I should be navigated to "/discover/assistant"
    And I should see the page body

  @DISCOVER-INTERACT-011 @P1
  Scenario: Navigate from home to MCP list
    Given I navigate to "/discover"
    When I click on the "more" link in the featured MCP tools section
    Then I should be navigated to "/discover/mcp"
    And I should see the page body

  @DISCOVER-INTERACT-012 @P1
  Scenario: Click featured assistant from home
    Given I navigate to "/discover"
    When I click on the first featured assistant card
    Then I should be navigated to the assistant detail page
    And I should see the assistant detail content
